<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <title>Document</title>
</head>

<body>
    <div id="info"></div>
    <script type="text/javascript" src="./lib/jquery.js"></script>
    <script type="text/javascript" src="./lib/template-web.js"></script>
    <script type="type/html" id="user-info">
        <div>姓名：{{name}}</div>
        <div>年龄：{{age}}</div>
        <div>性别：{{sex}}</div>
    </script>
    <script>
        var userList = {
            name: "张三",
            age: 18,
            sex: "女",
        };
        var ret = template("user-info", userList);
        $("#info").html(ret);
    </script>
</body>

</html>